<div class="content_playgame" id="content_game">
<div class="breadcrumb">
	<div class="rdfa-breadcrumb">
		<div xmlns:v="http://rdf.data-vocabulary.org/#">
			<div>
				<span class="breadcrumbs-title"> </span>
				<span typeof="v:Breadcrumb"><a rel="v:url" property="v:title" href="http://gamehaynhat.com/" class="home">Home</a></span>
				<span class="separator">></span> 
				<?php if (isset($parent_cate) && $parent_cate) { ?>
				<span typeof="v:Breadcrumb"><a rel="v:url" property="v:title" href="<?php echo category_url($parent_cate->cat_code);?>" title="<?php echo $parent_cate->cat_name;?>"><?php echo $parent_cate->cat_name;?></a></span> 
					<span class="separator">></span> 
				<?php } ?> 
			
				<?php if (isset($cate) && $cate) { ?>
					<span typeof="v:Breadcrumb"><a rel="v:url" property="v:title" href="<?php echo category_url($cate->cat_code);?>" title="<?php echo $cate->cat_name;?>"><?php echo $cate->cat_name;?></a></span> 
				<?php } ?> 
			<span class="separator">></span> <?php echo $game->game_title; ?></div>
		</div>
	</div>
</div>

		
		<div class="name_game">
			<h1><?php echo $game->game_title; ?></h1>
		</div>
		
		<div class="detail_play">
			<?php
	$flash_height = $game->game_file_rate_height_width*670;
	if(in_array($game->game_id,array(1586,1589, 1643)))
	{
		$flash_height =515;
		?>
		<?php
	}
	$game_file = $this->sserver->balancing_file($game->game_file);
	//$game_file =image_src($game->game_file );
?>
		   <div id="bordeswf">
  <object id="playgame" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0" width="670" height="<?php echo $flash_height;?>" id="preloader" align="middle"><param name="movie" value="<?php echo $game_file; ?>"><param name="quality" value="high"><param name="wmode" value="transparent"><param name="allowScriptAccess" value="always"><param name="allowFullScreen" value="true"><param name="bgcolor" value="#ffffff"><param name="flashvars" value=""><embed src="<?php echo $game_file; ?>" id="play_game" quality="high" type="application/x-shockwave-flash" wmode="transparent" pluginspage="http://www.macromedia.com/go/getflashplayer/" width="670" height="<?php echo $flash_height;?>" name="preloader" align="middle" allowScriptAccess="always" allowFullScreen="true" flashVars=""></object>
  
			</div>
			
			<div class="loading_bg">
				<div class="spinner">
				  <div class="spinner-container container1">
					<div class="circle1"></div>
					<div class="circle2"></div>
					<div class="circle3"></div>
					<div class="circle4"></div>
				  </div>
				  <div class="spinner-container container2">
					<div class="circle1"></div>
					<div class="circle2"></div>
					<div class="circle3"></div>
					<div class="circle4"></div>
				  </div>
				  <div class="spinner-container container3">
					<div class="circle1"></div>
					<div class="circle2"></div>
					<div class="circle3"></div>
					<div class="circle4"></div>
				  </div>
				</div>
			</div>
		</div>
		<div class="cls"></div>
		<div class="share_box">
			<div class="fb">
				<iframe src="http://www.facebook.com/plugins/like.php?href=<?php echo game_url($game->game_id, $game->game_code ); ?>&amp;width&amp;layout=standard&amp;action=like&amp;show_faces=false&amp;share=true&amp;height=35" scrolling="no" frameborder="0" style="border:none; overflow:hidden; height:35px;" allowTransparency="true"></iframe>
			</div>
		</div>
		<script type="text/javascript">
			$(document).ready(function(){				
				$("#game_out").click(function() {
					//alert('aaa');
					embed = $('#playgame').animate();
					embed_ie = $('#playgame_ie').animate();
					var max_width = 800;
					var ar = embed.width()/embed.height(); 
					var new_height= ($('#playgame embed').attr('height') *max_width)/$('#playgame embed').attr('width');
					var ar_ie = embed_ie.width()/embed_ie.height(); 
					$('#playgame').attr('width', max_width);
					$('#playgame embed').attr('width', max_width);
					$('#playgame embed').attr('height', new_height);
					$('#play_game').css('height', new_height);
					$('#play_game').css('padding-left', 90);
					//$('#play_game').css('height', max_width/ar);
					// Xu ly mo rong tren IE
					//$('#playgame_ie').attr('width', max_width);
					//$('#playgame_ie').attr('height', max_width/ar_ie);
					
					$("#content_game").attr("id", "content_game-full");
					//$('.centerBox-o-c-gamePage-gameplay').attr("class", "centerBox-o-c-gamePage-gameplay-full-1004");
					$('#game_out').css({'display':'none'});
					$('#game_in').css({'display':'inline-block'});
				});
				$("#game_in").click(function() {
					//var v_width = $("#hnd_width").val();
					embed = $('#playgame').animate();
					var max_width = 670;
					var ar = embed.width()/embed.height(); 
					//var ar_ie = embed_ie.width()/embed_ie.height(); 
					var new_height= ($('#playgame embed').attr('height') *max_width)/$('#playgame embed').attr('width');
					
					$('#play_game').css('width', max_width);
					//$('#play_game').attr('height', max_width/ar);
					$('#playgame').attr('width', max_width);
					$('#playgame embed').attr('width', max_width);
					$('#playgame embed').attr('height', new_height);
					$('#play_game').css('height', new_height);
					$('#play_game').css('padding-left', 0);
					// Xu ly thu nho tren IE
					//$('#playgame_ie').attr('width', max_width);
					//$('#playgame_ie').attr('height', max_width/ar_ie);
					
					$("#content_game-full").attr("id", "content_game");
					//$('.centerBox-o-c-gamePage-gameplay-full-1004').attr("class", "centerBox-o-c-gamePage-gameplay");
					$('#game_out').css({'display':'inline-block'});
					$('#game_in').css({'display':'none'});
				});
			});
			
</script>
		<div class="bartool">
			<ul>
				<li>
					<a href="javascript:void(0)" class="replay">
						Chơi lại
					</a>
				</li>
				<li>
					
					<a href="javascript:void(0)" class="zoom" id="game_out" onclick="javascript:change_screen_game_player(0);">Mở lớn</a>
					<a href="javascript:void(0)" class="zoom" id="game_in" onclick="javascript:change_screen_game_player(1);">Thu nhỏ</a>
				</li>
				<li>
					<a href="javascript:void(0)" class="darklight">
						Tắt/ mở đèn
					</a>
				</li>
				<li>
					<a href="javascript:void(0)" class="errorreport">
						Báo lỗi
					</a>
				</li>
			</ul>
		</div>
		<div class="cls"></div>
</div>

